﻿
using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Exceptions;
using Aliyun.Acs.Core.Profile;
using Aliyun.Acs.Dm.Model.V20151123;
using MahApps.Metro.Controls;
using System.Windows;
using System.Windows.Forms;

namespace Apps.CodeGenerator
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : MetroWindow
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void btnPageSingle_Click(object sender, RoutedEventArgs e)
        {
            WinPageSingle window = new WinPageSingle();
            window.Show();
        }

        private void btnSelPath_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog m_Dialog = new FolderBrowserDialog();
            DialogResult result = m_Dialog.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.Cancel)
            {
                return;
            }
            string m_Dir = m_Dialog.SelectedPath.Trim();
            this.txtPath.Text = m_Dir + "\\";

        }

        private void btnPageTreeSingle_Click(object sender, RoutedEventArgs e)
        {
            WinPageTreeSingle window = new WinPageTreeSingle();
            window.Show();
        }

        private void btnPageDTD_Click(object sender, RoutedEventArgs e)
        {
            WinPageDataGridToDataGrid window = new WinPageDataGridToDataGrid();
            window.Show();
        }

        private void btnPageDTT_Click(object sender, RoutedEventArgs e)
        {
            WinPageDataGridToTreeGrid window = new WinPageDataGridToTreeGrid();
            window.Show();
        }

        private void btnPageTTD_Click(object sender, RoutedEventArgs e)
        {
            WinPageTreeGridToDataGrid window = new WinPageTreeGridToDataGrid();
            window.Show();
        }

        //private void button_Click(object sender, RoutedEventArgs e)
        //{
        //    Translate window = new Translate();
        //    window.Show();
        //}

        //private void button1_Click(object sender, RoutedEventArgs e)
        //{

        //}
    }
}
